package com.xiaoy.base.entities.base;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.MappedSuperclass;

import com.xiaoy.base.entities.base.base.BaseEntity;

/**
 * 设备信息实体类
 * 
 * @author XiaoY
 * @explain 用于存放设备的信息
 * @date: 2015年3月31日 下午11:25:24
 */
@MappedSuperclass
public class DeviceInfo extends BaseEntity implements Serializable {
	/**
	 * 
	 * @author XiaoY
	 * @date: 2016年5月1日 上午11:25:19
	 */
	private static final long serialVersionUID = -8111421051020799070L;
	/* 设备信息uuid */
	private String deviceTypeUuid;
	/* 设备名 */
	private String deviceName;
	/* 型号 */
	private String version;
	/* 生产商 */
	private String producerName;
	/* 生产商联系方式 */
	private String producerPhone;
	/* 设备价格 */
	private Double devicePrice;
	/* 设备数量 */
	private Integer deviceAmount;
	/* 设备图片URL */
	private String devicePicUrl;
	/* 备注 */
	private String remark;

	/* 创建时间 */
	private Date creatTime;
	/* 设备故障次数 */
	private Integer deviceNum;

	Set<DeviceState> deviceState = new HashSet<DeviceState>();

	public DeviceInfo() {
	}

	public DeviceInfo(String deviceName) {
		this.deviceName = deviceName;
	}

	public DeviceInfo(String deviceTypeUuid, String version) {
		this.deviceTypeUuid = deviceTypeUuid;
		this.version = version;
	}

	public Integer getDeviceNum() {
		return deviceNum;
	}

	public void setDeviceNum(Integer deviceNum) {
		this.deviceNum = deviceNum;
	}

	public Date getCreatTime() {
		return creatTime;
	}

	public void setCreatTime(Date creatTime) {
		this.creatTime = creatTime;
	}

	public String getDeviceTypeUuid() {
		return deviceTypeUuid;
	}

	public void setDeviceTypeUuid(String deviceTypeUuid) {
		this.deviceTypeUuid = deviceTypeUuid;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getProducerName() {
		return producerName;
	}

	public void setProducerName(String producerName) {
		this.producerName = producerName;
	}

	public String getProducerPhone() {
		return producerPhone;
	}

	public void setProducerPhone(String producerPhone) {
		this.producerPhone = producerPhone;
	}

	public double getDevicePrice() {
		return devicePrice;
	}

	public void setDevicePrice(Double devicePrice) {
		this.devicePrice = devicePrice;
	}

	public Integer getDeviceAmount() {
		return deviceAmount;
	}

	public void setDeviceAmount(Integer deviceAmount) {
		this.deviceAmount = deviceAmount;
	}

	public String getDevicePicUrl() {
		return devicePicUrl;
	}

	public void setDevicePicUrl(String devicePicUrl) {
		this.devicePicUrl = devicePicUrl;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Set<DeviceState> getDeviceState() {
		return deviceState;
	}

	public void setDeviceState(Set<DeviceState> deviceState) {
		this.deviceState = deviceState;
	}

	@Override
	public String toString() {
		return "DeviceInfo [deviceTypeUuid=" + deviceTypeUuid + ", deviceName=" + deviceName + ", version=" + version
				+ ", producerName=" + producerName + ", producerPhone=" + producerPhone + ", devicePrice="
				+ devicePrice + ", deviceAmount=" + deviceAmount + ", devicePicUrl=" + devicePicUrl + ", remark="
				+ remark + ", creatTime=" + creatTime + ", deviceNum=" + deviceNum + ", deviceState=" + deviceState
				+ ", toString()=" + super.toString() + "]";
	}
}
